using System;
using System.IO;
using System.Windows.Forms;

namespace BLGenerator
{
    static class Program
    {
        private static string _applicationPath;

        #region Properties
        public static string ApplicationPath { get { return _applicationPath; } }
        #endregion

        private static void InitializeApplicationPath()
        {
            _applicationPath = Environment.CurrentDirectory;
            DirectoryInfo dir = new DirectoryInfo(_applicationPath);
            if (dir.Name == "Debug")
                dir = dir.Parent.Parent;
            _applicationPath = dir.FullName;

        }

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            InitializeApplicationPath();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
    }
}